package com.rcd2.pojo;

import java.util.List;

/**
 * ClassName:PageBean
 * Description:
 * 分页查询的JavaBean
 * @Date:2022/2/10 9:50
 * @Author:Mrhan
 */

/**
 * 因为分页的场景很多,这里是一个公共类PageBean,
 * 所以,具体当前页数据List内部的对象类型,是由用户决定的.
 * 所以,类PageBean后面声明一个泛型<T>
 * */
public class PageBean<T> {
    //总条数
    private int totalCount;
    //当前页数据
    private List<T> rows;

    @Override
    public String toString() {
        return "PageBean{" +
                "totalCount=" + totalCount +
                ", rows=" + rows +
                '}';
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }
}
